package com.dd;

import com.dd.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App2 {
    public static void main(String[] args) {
        //1.创建spring容器

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

        //2.从spring容器中获取bean对象
        BookService  bookService = applicationContext.getBean(BookService.class);

        //获取对象中的方法
        bookService.getList();
    }
}
